#include<stdio.h>
#include<string.h>

/*一个字符串，并输出该字符串中出现频率最高的字符（只有字母&只有小写）*/
int main()
{  
   char nums[26] = {0};
   char buffer[] = "dsadgsd";

   for (int idx = 0; idx < strlen(buffer);idx++)
   {
    nums[buffer[idx]-97]++;

   }
   
   for (int idx = 0; idx < 26;idx++)
   {
    printf("nums[%d] = %d\t",idx,nums[idx]);
    if ((idx + 1)%5 == 0)
    {
      printf("\n");
    }
   }
  int maxFre = nums[0];
  char whichone = '0';

  for(int idx = 1;idx < 26; idx++)
  {
    if (nums[idx] > maxFre)
    {
        maxFre = nums[idx];
        whichone = idx + 97;
    }
  }
printf("whichone = %c show %d time.\n",whichone,maxFre);
   return 0;

}